/* 游戏房间整体样式 */
.game-room {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: 
        linear-gradient(rgba(30, 30, 30, 0.85), rgba(50, 50, 50, 0.85)),
        url('../image/cat.jpg') center/cover no-repeat;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
    color: #fff;
}

/* 屏幕信息区域 */
#screen {
    width: 500px;
    height: 60px;
    margin: 20px 0;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 24px;
    font-weight: 600;
    line-height: 60px;
    text-align: center;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 聊天区域整体布局 */
#chat_area {
    width: 500px;
    height: 450px;
    margin: 20px 0;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* 聊天显示区域 */
#chat_show {
    width: 100%;
    height: 350px;
    padding: 15px;
    overflow-y: auto;
    background: rgba(255, 252, 230, 0.95);
    font-size: 18px;
    line-height: 1.6;
    scrollbar-width: thin;
    scrollbar-color: #ff8a00 rgba(255, 252, 230, 0.5);
}

/* 自定义滚动条样式 */
#chat_show::-webkit-scrollbar {
    width: 8px;
}

#chat_show::-webkit-scrollbar-track {
    background: rgba(255, 252, 230, 0.5);
    border-radius: 10px;
}

#chat_show::-webkit-scrollbar-thumb {
    background-color: #ff8a00;
    border-radius: 10px;
}

/* 聊天输入区域 */
.chat-input-container {
    display: flex;
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.95);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

#chat_input {
    flex: 1;
    height: 50px;
    padding: 0 15px;
    font-size: 18px;
    border: 2px solid rgba(255, 200, 100, 0.5);
    border-radius: 8px;
    outline: none;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

#chat_input:focus {
    border-color: #ff8a00;
    box-shadow: 0 0 0 3px rgba(255, 138, 0, 0.2);
}

#chat_button {
    width: 100px;
    height: 50px;
    margin-left: 10px;
    background: linear-gradient(135deg, #ff8a00, #ff5e00);
    color: white;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(255, 138, 0, 0.3);
}

#chat_button:hover {
    background: linear-gradient(135deg, #ff5e00, #ff3d00);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 138, 0, 0.4);
}

#chat_button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 5px rgba(255, 138, 0, 0.4);
}

/* 消息气泡样式 */
#self_msg {
    max-width: 70%;
    padding: 10px 15px;
    margin: 10px 0;
    line-height: 1.4;
    font-size: 16px;
    background: linear-gradient(135deg, #07be66, #05a357);
    color: white;
    border-radius: 18px 18px 0 18px;
    float: right;
    clear: both;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    word-wrap: break-word;
}

#peer_msg {
    max-width: 70%;
    padding: 10px 15px;
    margin: 10px 0;
    line-height: 1.4;
    font-size: 16px;
    background: linear-gradient(135deg, #5ddaf3, #3ac9e6);
    color: #333;
    border-radius: 18px 18px 18px 0;
    float: left;
    clear: both;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    word-wrap: break-word;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .game-room {
        padding: 10px;
    }
    
    #screen, #chat_area {
        width: 95%;
    }
    
    #chat_area {
        height: 400px;
    }
    
    #chat_show {
        height: 300px;
    }
    
    .chat-input-container {
        flex-direction: column;
    }
    
    #chat_button {
        width: 100%;
        margin: 10px 0 0 0;
    }
}
